﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace component_test.Components
{
    public class TabViewComponent : ViewComponent
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public async Task<IViewComponentResult> InvokeAsync(IEnumerable<TabViewModel> tabs)
        {
            //var tabs = new List<TabViewModel>
            //{
            //    new TabViewModel(){ Name = "主页", Link = "Index" },
            //    new TabViewModel(){ Name = "隐私", Link = "Privacy" },
            //};

            return View("Tab", tabs);
        }

        public class TabViewModel
        {
            public string Name { get; set; }

            public string Link { get; set; }

        }
    }
}
